#region head comment
/*
Code generate by YhdSdkTool.
email:starpeng@vip.qq.com
2013-01-21 23:00:57:569 +08:00
*/
#endregion

using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using YhdSdk.Domain;
using YhdSdk.Domain.Category;
using YhdSdk.Response.Category;

namespace YhdSdk.Request.Category
{
    /// <summary>
    /// 查询类别基本属性(不包含系列属性)
    ///<para></para>
    ///<para>根据类别编码和属性编码查询类别属性值。查询成功，</para>
    ///<para>则返回成功记录数及相应的类别属性信息。查询失败，则返回查询失败记录数及相应的错误描述信息</para>
    /// </summary>
    public class YhdCategoryAttributeGetRequest : IYhdRequest<YhdCategoryAttributeGetResponse>
    {
        /// <summary>
        /// 类别ID
        /// </summary>
        [XmlElement("categoryId")]
        public Int64 CategoryId
        {
            get;
            set;
        }

        /// <summary>
        /// 属性ID
        /// </summary>
        [XmlElement("attributeId")]
        public Nullable<Int64> AttributeId
        {
            get;
            set;
        }

        /// <summary>
        /// Api接口名称
        /// </summary>
        public String ApiName
        {
            get{ return "yhd.category.attribute.get"; }
        }

        /// <summary>
        /// 获取参数列表
        /// </summary>
        public IDictionary<string, string> GetParameters()
        {
            YhdDictionary parameters = new YhdDictionary();
            parameters.Add("categoryId" ,this.CategoryId);
            parameters.Add("attributeId" ,this.AttributeId);
            return parameters;
        }

        /// <summary>
        /// 验证参数
        /// </summary>
        public void Validate()
        {
            RequestValidator.ValidateRequired("categoryId", this.CategoryId);
        }

    }
}
